/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufpe.cin.dmo4.middleware.server;

import br.ufpe.cin.dmo4.middleware.message.Marshaller;
import br.ufpe.cin.dmo4.middleware.message.MarshallerImpl;
import br.ufpe.cin.dmo4.middleware.server.remoteobjects.Calculator;

/**
 *
 * @author Danilo
 */
public class Server {

    public static void main(String[] args) {

        Marshaller marshaller = new MarshallerImpl();

        Invoker invoker = new Invoker(marshaller);
        
        Calculator calculator = new Calculator();
        invoker.registerObject("calculator", calculator);

        ServerRequestHandler requestHandler = new ServerRequestHandlerImpl(8891, invoker);

        requestHandler.startListen();
    }
}
